package main

import "fmt"

const (
	x = iota
	y = iota
	z = iota
	w
)

const v = iota
const m = iota

func main() {
	//引用变量赋值
	var a string
	afuzhi(&a)
	fmt.Println(a)
	fmt.Println("=========================")
	bianliang()

	fmt.Println("=========================")
	//遇到一个const就会重置于0
	//其他的会自动加一 常量未赋值默认与上一个常量值相同
	fmt.Println(x)
	fmt.Println(y)
	fmt.Println(z)
	fmt.Println(w)
	fmt.Println(v)
	fmt.Println(m)

}

func afuzhi(b *string) {
	*b = "ccc"
	//fmt.Println(b)
}

func bianliang() {
	var a = [3]int{1, 2, 3}
	var b = &a
	b[1]++
	fmt.Println(a, b)
}

/*
输出结果

ccc
=========================
[1 3 3] &[1 3 3]
*/
